let requestUtil = require('@/api/http/request.js');

//获取消息分页
export const getMessageListAPI = (params) => {
	return requestUtil('/iot-device-saas-car-marketing/carmarketingmessagerecord/page', 'post',params, '');
}

//查询，已读，未读
export const readMessageAPI = (params) => {
	return requestUtil('/iot-device-saas-car-marketing/carmarketingmessagerecord/readMessage', 'post',params, '');
}

//删除消息记录
export const removeMessageAPI = (ids) => {
	return requestUtil('/iot-device-saas-car-marketing/carmarketingmessagerecord/remove', 'post',{ids:ids}, '删除中','删除成功');
}

//用户未读消息统计接口
export const getUnReadCountAPI = (userId) => {
	return requestUtil('/iot-device-saas-car-marketing/carmarketingmessagerecord/countMessageUnReadNum', 'post', {userId:userId}, '');
}

//一键已读接口
export const readAllMessageAPI = (messageTypes) => {
	return requestUtil('/iot-device-saas-car-marketing/carmarketingmessagerecord/readAllMessage', 'post', {messageTypes:messageTypes}, '请求中','已读成功');
}


//一键删除
export const removeAllAPI = (messageTypes) => {
	return requestUtil('/iot-device-saas-car-marketing/carmarketingmessagerecord/removeAll', 'post', {messageTypes:messageTypes}, '请求中','删除成功');
}
